class Solution {
public:
    uint32_t reverseBits(uint32_t n) {
        int i = 0;
        uint32_t ret = 0;
        for (i = 0; i < 32; i++)
        {
            uint32_t b = ((n >> i) & 1);
            b << (31 - i);
            ret |= (b << (31 - i));
        }
        return ret;
    }
};